import {requestMiddleware} from "@/request/mid_request.js";

async function getUnreadFeedbackCnt(param) {
    return await requestMiddleware({
        url: "/admin/get_unread_feedback_cnt",
        param: {},
    })
}

async function adminReplyFeedback(param) {
    return await requestMiddleware({
        url: "/admin/reply_feedback",
        param: param,
    })
}

async function adminGetFeedback(param) {
    return await requestMiddleware({
        url: "/admin/get_feedback",
        param: param,
    })
}

async function adminDeleteProduct(param) {
    return await requestMiddleware({
        url: "/admin/delete_product",
        param: param,
    })
}

async function adminUpdateProduct(param) {
    return await requestMiddleware({
        url: "/admin/update_product",
        param: param
    })
}

async function adminAddProduct(param) {
    return await requestMiddleware({
        url: "/admin/add_product",
        param: param,
    })
}

async function adminGetProduct(param) {
    return await requestMiddleware({
        url: "/admin/get_product",
        param: param,
    })
}

async function adminDeleteBanner(param) {
    return await requestMiddleware({
        url: "/admin/delete_banner",
        param: param,
    })
}

async function adminGetBanner(param) {
    return await requestMiddleware({
        url: "/admin/get_banner",
        param: param,
    })
}

async function adminUpdateBanner(param) {
    return await requestMiddleware({
        url: "/admin/update_banner",
        param: param,
    })
}

async function adminPostBanner(param) {
    return await requestMiddleware({
        url: "/admin/post_banner",
        param: param,
    })
}

async function adminDeleteTweet(param) {
    return await requestMiddleware({
        url: "/admin/delete_tweet",
        param: param,
    })
}

async function adminParseLink(param) {
    return await requestMiddleware({
        url: "/admin/parse_link",
        param: param,
    })
}

async function adminUpdateTweet(param) {
    return await requestMiddleware({
        url: "/admin/update_tweet",
        param: param,
    })
}

async function adminPostTweet(param) {
    return await requestMiddleware({
        url: "/admin/post_tweet",
        param: param,
    })
}

async function adminUpdateColumn(param) {
    return await requestMiddleware({
        url: "/admin/update_column",
        param: param,
    })
}

async function adminGetColumn() {
    return await requestMiddleware({
        url: "/admin/get_column",
        param: {},
    })
}

async function adminGetTweet(param) {
    return await requestMiddleware({
        url: "/admin/get_tweet",
        param: param,
    })
}

async function adminLogin(param) {
    return await requestMiddleware({
        url: "/admin/login",
        param: param,
    })
}

export {
    adminLogin,
    adminGetTweet,
    adminGetColumn,
    adminPostTweet,
    adminUpdateTweet,
    adminParseLink,
    adminDeleteTweet,
    adminUpdateBanner,
    adminPostBanner,
    adminGetBanner,
    adminDeleteBanner,
    adminUpdateColumn,
    adminGetProduct,
    adminAddProduct,
    adminUpdateProduct,
    adminDeleteProduct,
    adminGetFeedback,
    adminReplyFeedback,
    getUnreadFeedbackCnt,
};
